import request from '@/utils/request'
//登录接口
export const userLoginService = (user) =>
  request.post('/auth/login', user)
//添加学生
export const addStudentService = (data) => request.post('/students/create', data)
//添加老师
export const addTeacherService = (data) => request.post('/teachers/create', data)
//更新学生目标
export const updateGoalService = (data) => request.post(`/students/${data.id}/goalupdate`, data)
//删除学生
export const studentDelService = (id) => request.post(`/students/${id}/remove`)
//查询学生
export const getStudentListService = () => request.get('/students')
//更新学生
export const editStudentService = (data) => request.post(`/students/${data.id}/update`,data)


//查询班级
export const getClassListService = () => request.get('/klasses')
//增添班级
export const addClassListService = (data) => request.post('/klasses/create',data)
//删除班级
export const classDelService = (id) => request.post(`/klasses/${id}/remove`)
//更新班级
export const editClassService = (data) =>request.post(`/klasses/${data.id}/update`,data)


//增加课程
export const addCourseService = (data) => request.post('/courses/create', data)
//查询课程
export const getCourseListService = () => request.get('/courses')
//删除课程
export const courseDelService = (id) => request.post(`/courses/${id}/remove`)
//编辑课程
export const editCourseService = (data) => request.post(`/courses/${data.id}/update`,data)

//查询老师
export const getTeacherListService = () => request.get('/teachers');
//删除老师
export const teacherDelService = (id) => request.post(`/teachers/${id}/remove`)
//编辑老师
export const editTeacherService = (data) => request.post(`/teachers/${data.id}/update`, data);
//修改密码
export const editTeacherPwdService = (data) => request.post(`/teachers/${data.id}/updatepwd`, data);